<?xml version="1.0" encoding='Windows-1251'?>
<!DOCTYPE hrc PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN"
  "http://colorer.sf.net/2003/hrc.dtd">
<hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd">

  <type name="shpaml">

    <annotation>
     <documentation>
      SHPAML Markup Language
     </documentation>
     <contributors><![CDATA[
     ]]></contributors>
    </annotation>

    <import type="def"/>

    <region name="djangoTags" parent="def:Keyword"/>
    <region name="djangoFilters" parent="def:Keyword"/>
    <region name="shpamlWords" parent="def:Keyword"/>

    <scheme name="SimpleAttributes">
      <regexp match='/(?{def:Parameter}[\w_]+) \s* (?{def:Symbol}\=)/ix'/>
      <block start='/([&apos;&quot;])/' end='/\y1/' region='def:String'
             region00='def:PairStart' region10='def:PairEnd' scheme='def:empty'/>
    </scheme>

    <scheme name="Django">
        <!-- django keywords : http://stackoverflow.com/questions/8782438/list-of-all-reserved-keywords-in-django-templates -->
        <keywords ignorecase="no" region="djangoFilters">
            <word name="add"/>
            <word name="addslashes"/>
            <word name="capfirst"/>
            <word name="center"/>
            <word name="cut"/>
            <word name="date"/>
            <word name="default"/>
            <word name="default_if_none"/>
            <word name="dictsort"/>
            <word name="dictsortreversed"/>
            <word name="divisibleby"/>
            <word name="escape"/>
            <word name="escapejs"/>
            <word name="filesizeformat"/>
            <word name="first"/>
            <word name="fix_ampersands"/>
            <word name="floatformat"/>
            <word name="force_escape"/>
            <word name="get_digit"/>
            <word name="iriencode"/>
            <word name="join"/>
            <word name="last"/>
            <word name="length"/>
            <word name="length_is"/>
            <word name="linebreaks"/>
            <word name="linebreaksbr"/>
            <word name="linenumbers"/>
            <word name="ljust"/>
            <word name="lower"/>
            <word name="make_list"/>
            <word name="phone2numeric"/>
            <word name="pluralize"/>
            <word name="pprint"/>
            <word name="random"/>
            <word name="removetags"/>
            <word name="rjust"/>
            <word name="safe"/>
            <word name="safeseq"/>
            <word name="slice"/>
            <word name="slugify"/>
            <word name="stringformat"/>
            <word name="striptags"/>
            <word name="time"/>
            <word name="timesince"/>
            <word name="timeuntil"/>
            <word name="title"/>
            <word name="truncatewords"/>
            <word name="truncatewords_html"/>
            <word name="unordered_list"/>
            <word name="upper"/>
            <word name="urlencode"/>
            <word name="urlize"/>
            <word name="urlizetrunc"/>
            <word name="wordcount"/>
            <word name="wordwrap"/>
            <word name="yesno"/>
        </keywords>

        <keywords ignorecase="no" region="djangoTags">
            <word name="and"/>
            <word name="or"/>
            <word name="not"/>
            <word name="in"/>
            <word name="autoescape"/>
            <word name="endautoescape"/>
            <word name="block"/>
            <word name="endblock"/>
            <word name="comment"/>
            <word name="endcomment"/>
            <word name="csrf_token"/>
            <word name="cycle"/>
            <word name="debug"/>
            <word name="extends"/>
            <word name="filter"/>
            <word name="endfilter"/>
            <word name="firstof"/>
            <word name="for"/>
            <word name="endfor"/>
            <word name="if"/>
            <word name="endif"/>
            <word name="ifchanged"/>
            <word name="endifchanged"/>
            <word name="ifequal"/>
            <word name="endifequal"/>
            <word name="ifnotequal"/>
            <word name="endifnotequal"/>
            <word name="include"/>
            <word name="load"/>
            <word name="now"/>
            <word name="regroup"/>
            <word name="spaceless"/>
            <word name="endspaceless"/>
            <word name="ssi"/>
            <word name="templatetag"/>
            <word name="url"/>
            <word name="widthratio"/>
            <word name="with"/>
            <word name="endwith"/>
        </keywords>

        <block start='/([&apos;&quot;])/' end='/\y1/' region='def:String'
             region00='def:PairStart' region10='def:PairEnd' scheme='def:empty'/>
    </scheme>

    <scheme name="shpaml">
      <keywords ignorecase="no" region="shpamlWords">
            <word name="PASS"/>
            <word name="VERBATIM"/>
      </keywords>

      <!-- gray text after the pipe -->
      <regexp match='/ (\s* \| (?{def:Symbol} .*))? \s* $/ix' region='def:Text'/>
      
      <!-- class "." and div "#" markup -->
      <regexp match='/(?{def:Keyword}[\.\#])[\w\-]+/ix' region='def:Comment' />

      <!-- attributes -->
      <regexp match='/\s* (?{def:Number}[\w\-]+) \= (?{def:String} &apos; [^&apos;]+ &apos;) /ix' region='def:Text'/>
      <regexp match='/\s* (?{def:Number}[\w\-]+) \= (?{def:String} &quot; [^&quot;]+ &quot;) /ix' region='def:Text'/>
      <regexp match='/\s* (?{def:Number}[\w\-]+) \= (?{def:String} [\S]+) /ix' region='def:Text'/>

      <!-- failed experiments
      <block start='/\M &lt; ([\w\-])+ [^&gt;]* &gt; /ix' end='/ &lt; \/ \y1 &gt; /ix' scheme='html:html' />
      <regexp match='/^ (\s\s)* (?{def:Number} \w+) /ix' region='def:Text'/>
      -->

      <!-- django template tags & filters -->
      <block start='/ \{ \{ /ix' end='/ \} \} /ix' region00='def:PairStart' region10='def:PairEnd' scheme='Django'/>
      <block start='/ \{ \% /ix' end='/ \% \} /ix' region00='def:PairStart' region10='def:PairEnd' scheme='Django'/>

      <!-- embedded javascript, css, comment blocks-->
      <block start='/^((\s\s)*)script type=([&apos;&quot;])?text\/javascript([&apos;&quot;])? (?{def:Keyword}VERBATIM)/' end='/^\M (\s*$|\y1\s)?! /ix' region='def:Insertion'       region01='def:Outlined' region00='def:PairStart' region10='def:PairEnd' content-priority='low' scheme='jScript:jScript'/>
      <block start='/^((\s\s)*)style type=([&apos;&quot;])?text\/css([&apos;&quot;])? (?{def:Keyword}VERBATIM)/' end='/^\M (\s*$|\y1\s)?! /ix' region='def:Insertion' region01='def:Outlined' region00='def:PairStart' region10='def:PairEnd' content-priority='low' scheme='css:css'/>
      <block start='/^((\s\s)*)(?{def:Keyword}::comment)/' end='/^\M (\s*$|\y1\s)?! /ix' region='def:Comment' region01='def:Outlined' region00='def:PairStart' region10='def:PairEnd' content-priority='low' scheme='def:Comment'/>

    </scheme>

  </type>
</hrc>
<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is the Colorer Library.
   -
   - The Initial Developer of the Original Code is
   - Igor Russkih <irusskih at gmail dot com>
   - Portions created by the Initial Developer are Copyright (C) 2009
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s): 
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either the GNU General Public License Version 2 or later (the "GPL"), or
   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   - in which case the provisions of the GPL or the LGPL are applicable instead
   - of those above. If you wish to allow use of your version of this file only
   - under the terms of either the GPL or the LGPL, and not to allow others to
   - use your version of this file under the terms of the MPL, indicate your
   - decision by deleting the provisions above and replace them with the notice
   - and other provisions required by the LGPL or the GPL. If you do not delete
   - the provisions above, a recipient may use your version of this file under
   - the terms of any one of the MPL, the GPL or the LGPL.
   -
   - ***** END LICENSE BLOCK ***** -->
